package com.wxg.demo;

import java.io.File;

import com.wxg.print.BuildFinalPrintPage;
import com.wxg.print.StoreHtmlWithGenId;
import com.wxg.print.WhosOverPage;
import com.wxg.utils.MyDriver;

/**
 * date : 2018年2月9日<br>
 * 
 * @author Wxg
 *
 */
public class Emr105 {
	public static String[] allowArr = "html_103,html_104,html_105,html_109,html_110,html_114,html_115,html_116,html_117,html_118,html_120".split(",");
	
	public static void main(String[] args) {
		code101();
	}
	public static void code101(){
		String dirpath = "F:\\wxg\\for_print\\myjfserver\\src\\main\\webapp\\uehtml";
		File dir = new File(dirpath);
		for(File file : dir.listFiles()){
			if( file.getName().contains("html_120") ){
				StoreHtmlWithGenId storeHtmlWithGenId = new StoreHtmlWithGenId();
				String genFilepath = storeHtmlWithGenId.store(file);
				String idPrefix = storeHtmlWithGenId.getPrefix();
				WhosOverPage whosOverPage = new WhosOverPage(genFilepath, idPrefix);
				whosOverPage.parse();
				BuildFinalPrintPage bfpp = new BuildFinalPrintPage(genFilepath, whosOverPage.getPages());
				System.out.println( bfpp.finalPrintPage() );
			}
		}
		MyDriver.closeStaticDriver();
	}
}
